#pragma once
#include <string>
#include "zen_metal_type.h"
#include "zen_metal_texture.h"

namespace Zen { namespace Metal {

	struct BufferID;

	class Buffer
	{
	public:
		Buffer();

		void create(size_t len, void const * data = nullptr);

		void update(size_t offset, size_t size, void const * data);

		std::shared_ptr<BufferID> getID() const;
		
	protected:
		std::shared_ptr<BufferID> m_id = nullptr;
	};

	struct ShaderKitID;

	class ShaderKit
	{
	public:
		ShaderKit(std::string const & name = "pipe");

		std::shared_ptr<ShaderKitID> getID() const { return m_id; }

		std::string const & getName() const { return m_name; }

		void create
		(std::string const & vshader,
		 std::string const & fshader);

		void create
		(std::string const & vshader,
		 std::string const & fshader,
		 Blends blends);

	protected:
		std::string m_name;
		std::shared_ptr<ShaderKitID> m_id = nullptr;
	};
}}
